<?php


namespace app\admin\controller\base;


use app\admin\service\base\DutiesService;
use app\BaseController;
use think\response\Json;

class Duties extends BaseController
{
    /**
     * 列表
     * @return Json
     */
    public function index(DutiesService $dutiesService):Json
    {
        $params = request()->param();
        return $dutiesService->index($params);
    }

    /**
     * 详情
     * @param DutiesService $dutiesService
     * @return Json
     */
    public function read(DutiesService $dutiesService):Json
    {
        $params = request()->param();
        return $dutiesService->read($params);
    }

    /**
     * 创建班级
     * @return Json
     */
    public function save(DutiesService $dutiesService):Json
    {
        $params = request()->param();
        return $dutiesService->save($params);
    }

    /**
     * 更新班级信息
     * @return Json
     */
    public function update(DutiesService $dutiesService):Json
    {
        $params = request()->param();
        return $dutiesService->update($params);
    }


    /**
     * 删除班级信息
     * @return Json
     */
    public function delete(DutiesService $dutiesService):Json
    {
        $params = request()->param();
        return $dutiesService->delete($params);
    }
}